package com.augmentum.oes.dao.mybatis;
import org.springframework.stereotype.Repository;

import com.augmentum.oes.dao.BaseDao;
import com.augmentum.oes.dao.UserDao;
import com.augmentum.oes.model.User;
/**
 * deal with some information for user
 */
@Repository
public class UserDaoImpl extends BaseDao implements UserDao {
    private final static String PREFIX = User.class.getName() + ".";

    public User getInfo(String userName) {
        return sst.selectOne(PREFIX + "getByName", userName);
    }
    @Override
    public String getName(int id) {
        return sst.selectOne(PREFIX + "getUserName", id);
    }

/*    class URowMapper implements RowMapper<User> {
        @Override
        public User mapRow(ResultSet rs, int arg1) throws SQLException {
            User user = new User();
            JDBCUtil.toBean(user, rs);
            return user;
        }
    }*/
}
